$(document).ready(function() {

    function get_result() {
    	// Loading result, if any
        $('#result').load('result');
    	
        // Check to see if the job is done
        var html = $('#result').html();
        if (html.search("File name") < 0) {
        	// Job not done, try again later
            setTimeout(get_result, 5000);
        }

    }
    get_result();
    return false;
});
